<template>
    <div class=''>
        home
        <el-button type="" @click="open">打开指令组件</el-button>
        <el-button type="" @click="getApi">发送请求</el-button>
    </div>
</template>

<script setup lang="ts">
import { showComponent } from '@/utils/directiveComponents'
import { getHomeData } from '@/api/home'

const getApi = ()=>{
    getHomeData({
        aaa:1
    }).then(data=>{
        console.log(data);
    })
}

const open = ()=>{
    showComponent('Confirm',{
        value:'传递来了'
    })
}
</script>